package com.chenjiagou.service.impl;

import com.chenjiagou.mapper.RegisterMapper;
import com.chenjiagou.pojo.User;
import com.chenjiagou.service.RegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RegisterServiceImpl implements RegisterService {

    @Autowired
    private RegisterMapper registerMapper;

    @Override
    public boolean register(User user) {
        try {
            registerMapper.insertUser(user);
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
}
